﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Criterion;

namespace MiserDB.DataHelp
{
    public class CommentHelp : QueryHelper
    {
        public override IList<T> GetList<T>(int fkId)
        {
            //HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();
            IList<T> list = Session.CreateCriteria(typeof(T))
                .Add(Restrictions.Eq("ArticleId", fkId))
                .List<T>();
            return list;
        }

        //public virtual object Save<T>(T obj)
        //{

        //    _session.Save(obj);
        //    _session.Save(obj);
        //    _session.Save(obj);
        //}
    }
}
